package kr.hkit.powerjava.chapter14.work;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class InputPanel extends JPanel {
	private JLabel lblNewLabel;
	private JTextField textField;

	/**
	 * Create the panel.
	 */
	public InputPanel(int cSize) {
		initialize(cSize);
	}

	private void initialize(int cSize) {

		lblNewLabel = new JLabel("New label");
		add(lblNewLabel);

		textField = new JTextField();
		add(textField);
		textField.setColumns(cSize);
	}

	public void setLblNewLabel(String text) {
		this.lblNewLabel.setText(text);
	}

	public String getTextField() {
		return textField.getText();
	}

	public void setTextField(String text) {
		textField.setText(text);
	}

}
